package com.erytech.linktalk.web.client.datasource;

import com.erytech.linktalk.web.client.framework.DataUpdateEvent;
import com.erytech.linktalk.web.client.service.MessageInfo;

public class MessageUpdateEvent extends DataUpdateEvent {

	public static final int POST_SUCCESS = 1;

	public static final int POST_FAILURE = 2;

	public static final int POLL_SUCCESS = 3;

	public static final int POLL_FAILURE = 4;
	
	private MessageInfo[] messages;

	private Throwable throwable;
	
	public MessageUpdateEvent(Object src, int type, Throwable t) {
		super(src, type);
		this.throwable = t;
	}

	public MessageUpdateEvent(Object src, int type, MessageInfo[] messages) {
		super(src, type);
		this.messages = messages;
	}

	public MessageInfo[] getMessages() {
		return messages;
	}

	public Throwable getThrowable() {
		return throwable;
	}
	
}
